Endoscope system

ABSTRACT

An endoscope includes a storage device. The storage device is configured to store ownership information. The ownership information indicates a term for which the endoscope is allowed to be utilized.

This application is a divisional of U.S. patent application Ser. No.10/188,096, filed Jul. 3, 2002, issued as U.S. Pat. No. 7,033,316 thedisclosure of which is expressly incorporated herein by reference in itsentirety.

BACKGROUND OF THE INVENTION

The present invention relates to an endoscope system adapted to managedata of a plurality of endoscopes.

There are endoscopes provided with a solid state imaging device forcapturing images inside a human body. Such endoscopes, so calledelectronic endoscopes are normally connected to a processor thattransforms the output signals from the solid state imaging device intoimage signals so that output devices such as monitors and video printerscan display or print the image captured by the solid state imagingdevice.

The endoscope is connected detachably to the processor so that theendoscope can be changed to a suitable type in accordance with thelocation of the human body to be inspected or treated with theendoscope. That is, the endoscope and the processor can be used invarious combinations.

The endoscope is usually provided with a memory, such as an EEPROM, intowhich various kinds of data related to the endoscope are stored. Datastored into the memory includes, for example, type and serial number ofthe endoscope, and calibration data for adjusting the white balance ofthe image captured by the solid state imaging device. The calibrationdata for adjusting the white balance includes the amount of brightnessincrease/decrease of red and blue colors, which will be referredhereinafter as “wb(r)” and “wb(b)”, respectively.

The endoscope type and serial number are read by the processor as theendoscope is connected, and displayed on, for example, a monitor. Anoperator can check the information about the endoscope from the serialnumber by searching a database, for example, constructed in anindependent computer. There is, however, information which should bechecked whenever the endoscope is used. Such information requiresrepetitive search work which burdens the operator.

Therefore, there is a need for an endoscope system that allows theoperator to check information about the endoscope in use in a simplermanner.

The calibration data for white balance, wb(r) and wb(b), is also read bythe processor to adjust the white balance of the image generated in theprocessor based on the output signals from the solid state imagingdevice.

The color balance adjusting abilities, however, are slightly differentbetween each processor. Therefore, the processor often fails to achieveproper white balance by adjusting the colors in accordance with thecalibration data obtained from the endoscope. In such case, proper whitebalance is achieved by performing manually a fine adjustment.

Recently, processors have been developed that are provided with a memoryfor storing the calibration data obtained as a result of the fineadjustment mentioned above. The calibration data is stored in the memoryin association with data intrinsic to the endoscope, such as serialnumber, to construct a database. The processor can utilize thecalibration data in the database whenever the endoscope is connected andused again in the future. In this way, the processor eliminates thenecessity of repetitive manual fine adjustment of the white balance

The number of endoscopes, however, of which data can be registered tothe database is restricted because of the finite available memory spacethereof. Thus, if there is not available memory space for storing dataof a new endoscope, unimportant data such as that of old or seldom usedendoscopes should be deleted manually to free up memory space. Suchmanual operation is a cumbersome task and may cause deletion ofimportant data such as that of new or frequently used endoscopes ifproper care is not used when manually deleting data.

Therefore, there is also a need for an endoscope system that manages thedatabase of endoscope data such that the deletion of important data isprevented.

SUMMARY OF THE INVENTION

The present invention provides the advantage in that, in an endoscopesystem, important data of endoscopes in a database is prevented frombeing unintentionally deleted. The present invention also provides theadvantage that the operator can check information about the endoscope inuse in a simple manner.

According to an aspect to the invention, an endoscope system including adatabase and a database managing device is provided. The database isconfigured to store a plurality of pieces of endoscope data. Each pieceof the endoscope data corresponds to a different endoscope and isassociated with ownership information indicating a term for which thecorresponding endoscope is allowed to be utilized. The database managingdevice is configured to select one of the plurality of pieces ofendoscope data stored in the database and replace it with a new piece ofendoscope data corresponding to a new endoscope. The database managingdevice selects the piece of endoscope data to be replaced based on theownership information. In this manner, the database managing device canselect and replace the piece of endoscope data of the database so that,for example, the endoscope data that corresponds to the endoscopesallowed to be utilized for relatively long term remains in the database.

The ownership information may include information on whether thecorresponding endoscope is purchased or not. Purchased endoscopes aregenerally allowed to be used permanently and therefore the piece ofendoscope data corresponding to purchased endoscopes should be left inthe database. Accordingly, the database managing device may select andreplace the piece of endoscope data related to the endoscope that is notpurchased in preference to purchased endoscope data.

Alternatively, the ownership information may include information onwhether the corresponding endoscope is leased or not. Since the leasedendoscope is allowed to be utilized for only a limited term, thedatabase managing device may select the piece of endoscope data relatedto the endoscope being leased in preference to other endoscope data andreplace it with the new endoscope data.

In addition, the ownership information may include information onwhether a term of lease of the endoscope is less than a predeterminedperiod. In this case, the database managing device may select the pieceof endoscope data related to the term of lease less than thepredetermined period in preference to other endoscope data.Alternatively, the database managing device may select the piece ofendoscope data related to the term of lease which has already expiredsince such endoscope may not be utilized in the future again

Optionally, each of the pieces of the endoscope data is associated withregistration information including a date of when the piece of endoscopedata is stored into the database, and the database managing deviceselects one piece of the endoscope data to be replaced based on theregistration information among a plurality of pieces of the endoscopedata selected based on the ownership information. In particular, thedatabase managing device may select the piece of endoscope data relatedto the registration information including the oldest date since such oldendoscope data may have less importance than those registered later.

Alternatively, each of said pieces of endoscope data is associated withused date information including a date of the corresponding endoscopebeing used for the last time. The database managing device selects onepiece of the endoscope data to be replaced based on the used dateinformation among a plurality of pieces of the endoscope data selectedbased on said ownership information. In particular, the databasemanaging device may select the endoscope data related to the used datainformation including the oldest date, since the endoscope not used fora long time may be seldom used also in the future.

Optionally, the database and the database managing device are providedto a processor configured to be connected to the endoscope for receivingand processing signals from the endoscope.

According to another aspect to the invention, an endoscope systemincluding a processor and an output device is provided. The processor isconnectable to various endoscopes to receive and process signals fromthe endoscopes being connected. The processor includes a databaseconfigured to store a plurality of pieces of endoscope data eachcorresponding to a different one of said endoscopes. Each piece of theendoscope data is associated with ownership information which indicatesa term for which the corresponding endoscope is allowed to be utilized.The output device is configured to output the ownership information sothat an operator of the endoscope system can confirm the ownershipInformation

Optionally, the output device outputs the ownership information of theendoscope currently connected to the processor so that the operator canconfirm the ownership information of the endoscope currently connected.

Optionally, the output device is a monitor for displaying an imagecaptured by an imaging device provided to the endoscope. In this case,the ownership information can be displayed, for example, simultaneouslywith the image captured by the imaging device.

According to another aspect of the invention, specificationsinformation, indicating the design specifications of the correspondingendoscope, is associated with each piece of the endoscope data in thedatabase instead of the ownership information and outputted from theoutput device so that the operator can confirm the specifications of theendoscope.

According to another aspect of the invention, an endoscope systemincluding a database and a database managing device is provided. Thedatabase is configured to store a plurality of pieces of endoscope dataeach corresponding to a different endoscope. Each piece of the endoscopedata is associated with term information which indicates a term thecorresponding piece of endoscope data is valid. In order to prevent thedatabase from being filled with invalid endoscope data, the databasemanaging device is configured to selectively delete the piece ofendoscope data in the database based on the term information.

According to another aspect of the invention, an endoscope including astorage device configured to store ownership Information and/orspecifications information is provided. The ownership informationincludes a term for which the endoscope is allowed to be utilized, whilethe specifications information indicates design specifications of theendoscope.

BRIEF DESCRIPTION OF THE ACCOMPANYING DRAWINGS

FIG. 1 schematically shows the configuration of an electronic endoscopesystem according to an embodiment of the invention;

FIG. 2 shows an exemplary data format of a memory provided to anelectronic endoscope in the electronic endoscope system of FIG. 1;

FIG. 3 shows an example of the data stored in the memory of theelectronic endoscope in FIG. 1;

FIG. 4 shows an exemplary structure of a database established in amemory of a processor in the electronic endoscope system of FIG. 1;

FIG. 5 is a flow chart showing a main routine representing the operationof the processor of the electronic endoscope system shown in FIG. 1according to an embodiment of the invention;

FIG. 6 is a flow chart showing a subroutine DISPLAY SCOPE INFORMATION ofthe main routine shown in FIG. 5;

FIG. 7 is a flow chart showing a subroutine ENDOSCOPE REGISTRATION ofthe main routine in FIG. 5;

FIG. 8 is a flow chart showing a subroutine SELECT DATA of thesubroutine ENDOSCOPE REGISTRATION in FIG. 7;

FIG. 9 is a flow chart showing a subroutine DISPLAY DATE & TIME of themain routine shown in FIG. 5;

FIG. 10 is a flow chart showing a subroutine ADJUSTMENT of the mainroutine shown in FIG. 5;

FIG. 11 shows a modification of the subroutine SELECT DATA shown in FIG.8;

FIG. 12 is a flow chart showing the operation of the processor when theelectronic endoscope is connected according to another embodiment of theinvention;

FIG. 13 schematically shows a modified configuration of the electronicendoscope system of FIG. 1.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Hereinafter, embodiments of the invention will be described withreference to the accompanying drawings.

FIG. 1 schematically shows the configuration of an electronic endoscopesystem 1 according to an embodiment of the invention.

The electronic endoscope system 1 includes an electronic endoscope 100and a processor 200 for processing signals from the electronic endoscope100.

The electronic endoscope 100 includes an flexible inserting tube 110 tobe inserted into a human body and an operation portion 120 connected tothe proximal end of the inserting tube 110. The electronic endoscope 100further includes a connector 130 which is detachably connected to theprocessor 200.

A solid state imaging device such as a CCD 104 and an objective opticalsystem 101 for forming an optical image on a light receiving surface ofthe CCD 104 are provided to the distal end portion of the inserting tube110.

Further, one or more operation buttons 107 are provided to the operationportion 120 for controlling the operation of the processor 200.

Further, a memory such as an EEPROM 102 is provided to the electronicendoscope 100 for storing data related to the endoscope 100, inparticular, data intrinsic to each endoscope. In the present embodiment,the EEPROM 102 is located in the connector 130.

The processor 200 includes a CPU 201 which is connected to the operationbuttons 107 and the EEPROM 102 via an signal cable 108. The CPU 210controls the operation of the processor 200 in accordance with thesignals from the operation buttons 107. The CPU 210 also accesses theEEPROM 102 to retrieve data stored therein.

The CPU 201 is further connected to an input unit, such as a keyboard400, via an interface 212, to control the operation of the processor 200in accordance with the commands inputted from the keyboard 400.

The processor 200 is also provided with an operation panel 207. Aplurality of operation buttons (not shown) are arranged on the operationpanel 207 such that an operator of the endoscope system 1 can press eachbutton. Each button outputs a signal to the CPU 201, as being pressed,to control the operation of the processor 200.

The processor includes a light source 203 optically connected to the endof a light guide 103 that is arranged throughout the electronicendoscope 100 from the connector 130 to the tip end of the insertingtube 110. The light emitted from the light source 203 is transmittedthrough the light guide 103 to illuminate the area in front of the tipend of the inserting tube 110.

An diaphragm 210 is provided on the light path of the light emitted fromthe light source 203 to restrict the amount of light introduced into thelight guide 103. An diaphragm controller 211 controls the opening sizeof the diaphragm 210, or the amount of light introduced into the lightguide 103, in accordance with signals from the CPU 201. The operator canfreely control the opening size of the diaphragm 210 by operating thekeyboard 400 or the operation panel 207.

First and second signal processors 204 and 205 are provided to theprocessor 200 to display images captured by the CCD 104 on a monitor300. The first signal processor 204 receives the signal from the CCD 104via a CCD signal cable 109 and transforms it into RGB digital image datarepresented in 256 levels of gray scale. The first signal processor 204outputs the digital image data to the second signal processor 205 whichgenerates video signal, such as NTSC, from the digital image data. Thesecond signal processor 205 further adjusts the white balance of thevideo signal based on calibration data wb(r) and wb(b) received from theCPU 201 as will be described later. The second signal processor 205outputs the video signal to the monitor 300 so that the monitor 300displays the image captured by the CCD 104.

Note that the output device to which the second signal processor 205 maybe connected is not limited to the monitor 300, however, the secondsignal processor 205 may also be connected to other kinds of outputdevices such as a video printer., for example.

A CRT controller 206 is provided to the processor to superimpose textinformation on the image displayed on the monitor 300. The CRTcontroller 206 generates video signals representing the text informationrequested by the CPU 201 and output the video signals to the monitor 300in synchronization with the video signal from the second signalprocessor 205. In this way, the processor 200 superimposes arbitrarytext information, such as information obtained from the CPU 201, on theimage captured by the CCD 104.

The processor 200 is also provided with a Real Time Clock (RTC) 209 anda memory 208. The RTC 209 provides information on current date & time tothe CPU 201. The memory 208 is adapted to include a database for datarelated to endoscopes as will be described later.

FIG. 2 shows an exemplary data format of the EEPROM 102, and FIG. 3shows an example of the data stored in the EEPROM 102.

In the present embodiment, the storage capacity of the EEPROM 102 is 16bytes and the following information are stored in the EEPROM 102 in thefollowing order.

1) “serial no.” (three bytes): the serial number of the electronicendoscope 100 which is unique for each endoscope. The “serial no.” maybe set to one of values from 1 through 16777215 (0×1 through 0×ffffff inhexadecimal digit).

2) “scope name” (six bytes): six alphanumeric characters representingthe type of the electronic endoscope 100.

3) “wb(r)” (one byte): a calibration value of the red color brightnessfor adjusting white balance of the image captured by the CCD 104.

4) “wb(b)” (one byte): a calibration value of the blue color brightnessfor adjusting white balance of the image captured by the CCD 104. Both“wb(r)” and “wb(b)” can take a value between −128 and 127. As shown inFIG. 3, “wb(r)” and “wb(b)” are respectively set to −4 and 10 (0×7c and0×8a in hexadecimal digit) in the present embodiment. This indicates thebrightness of red color should be decreased by four levels in grayscale, while the brightness of blue should be increased by ten levels.

5) “ownership” (one byte): a variable representing whether the endoscopeis purchased or leased. “ownership”=0, 1 and 2 (0×0, 0×1, and 0×2 inhexadecimal digit) respectively represents whether the endoscope ispurchased, leased for a long term (a term not less than 30 days, forexample), or leased for a short term (term less than 30 days, forexample).

6) “spec” (one byte): a variable representing the specifications of thedesign of the electronic endoscope 100. If the electronic endoscope 100is a standard type, then “spec” is set to 0. If the electronic endoscopeis a custom made one, then spec is set to a value corresponding to theparticular design specifications. In the present embodiment, “spec” isset to 1 which indicates the optical system 101 includes a lens appliedwith special coatings.

7) “expiration” (three bytes): the expiration date of the lease of theelectronic endoscope 100. The first one byte of “expiration” indicatesthe year, the next one the month, and the last one the day. In theexample shown in FIG. 3, value 040331 is assigned to “expiration” whichindicates the expiration of the lease is Mar. 31, 2004. If theelectronic endoscope 100 is a purchased one, then 000000 is assigned to“expiration”. It should be noted that, in some embodiments of theinvention, “expiration” indicates the expiration date of the servicelife of the endoscope instead of the expiration date of the lease.

Among the items recited above, the “serial no.”, “scope name”,“ownership”, and “expiration” are examples of information for managingthe endoscope, while “wb(r)”, “wb(b)”, and “spec” are examples ofinformation representing the characteristics of the endoscope.

The data of EEPROM 102 are copied to the memory 208 of the processor 200as the electronic endoscope 100 is connected to the processor 200 forthe first time to register the endoscope to the database.

FIG. 4 shows an exemplary structure of the database established in thememory 208 of the processor 200. The database includes 39 records, eachrecord being defined for storing data related to one specific endoscope.Thus, data of 39 endoscopes can be stored in the database.

Each record includes the following items in the following order.

-   -   1) “register no.”,    -   2) “scope name”    -   3) “serial no.”,    -   4) “wb(r)”,    -   5) “wb(b)”,    -   6) “ownership    -   7) “spec”,    -   8) “expiration”,    -   9) “registered date & time”,    -   10) “used date & time”,    -   11) “count”.    -   “register no” is utilized for identifying the record. In the        present embodiment, a serial number from 1 to 39 is assigned to        the records.

“scope name”, “serial no.”, “wb(r)” and “wb(b)”, “ownership”, “spec”,and “expiration”, are items same as that in the EEPROM 102.

“registered date & time” is the date and time when the electronicendoscope 100 is connected to the processor 200 for the first time.“registered date & time” includes six figures date information and fourfigures time information. If “registered date & time” is set to“021015.1424”, for example, then it represents Oct 15, 2002, 2:24 p.m.

“used date & time” is the date and time when the electronic endoscope100 was connected to the processor 200, or used, for the last time. Theformat of “used date & time” is the same as that of “registered date &time”.

“count” is the number of times the electronic endoscope 100 is connectedto the processor 200, or used. This variable may be used as anindication of the frequency the endoscope is used.

FIG. 5 is a flow chart showing a main routine of the operation of theprocessor 200 according to an embodiment of the invention.

At first, the CPU 201 of the processor 200 initializes a variable“current_scope” to 0 (S100). The variable “current_scope” is for storingthe “register no.” of the record in which the data of the endoscopecurrently connected to the processor 200 is stored. If 0 is assigned to“current_scope”, it represents that no endoscope is currently connectedto the processor 200.

After the initialization of “current_scope”, the CPU 201 remains in anidle state until the electronic endoscope 100 is connected to theprocessor 200(S102).

When the electronic endoscope 100 is connected to the processor 200(S102: Yes), the CPU 201 accesses the EEPROM 102 of the electronicendoscope 100 and obtains the data stored therein (S104). Next, thefirst and second signal processors 204, 205 transform the output signalfrom the CCD 104 into video signal to display the image captured by theCCD on the monitor 300 (S106).

Then, the CPU 201 executes a subroutine DISPLAY SCOPE NAME to displaythe information of the electronic endoscope 100 currently connected tothe processor 200 on the monitor 300 (S108). Then, a subroutineENDOSCOPE REGISTRATION is executed to store the data obtained from theEEPROM 102 into the database established in the memory 208 (S110).

Next, the white balance of the image captured by the CCD 104 of theelectronic endoscope 100 is adjusted using the calibration value(“wb(r)”, “wb(b)”) obtained form the EEPROM 102 (S112). That is, the CPU201 sends the calibration value of “wb(r)” and “wb(b)” to the secondsignal processor 205 so that the second signal processor 205 adjusts thecolor balance of the image signals generated there.

After S112, the processor watches whether the electronic endoscope 100is still connected, and as long as the electronic endoscope 100 is stillconnected to the processor 200 (S114:Yes), the processor 200 displaysthe current date and time on the monitor 300 by executing a subroutineDISPLAY DATE & TIME (S116), and also performs various kinds ofadjustments in accordance with manual operation by the operator byexecuting a subroutine ADJUSTMENT (S118).

If the electronic endoscope 100 is disconnected from the processor 200(S114:No), the operation of the processor 200 returns to S100.

FIG. 6 is a flow chart showing the subroutine DISPLAY SCOPE INFORMATIONcalled in S108 of the main routine shown in FIG. 5.

In this routine, the CPU 201 sends the alphanumeric characters of the“scope name” obtained from the EEPROM 102 to the CRT controller 206 tosuperimpose the type of the electronic endoscope 100 on the imagecaptured by the CCD 104 and displayed on the monitor 205 (S152). The CPU201 also generates a text information that corresponds to thespecifications of the electronic endoscope indicated by “spec” and sendsit to the CRT controller 206. Thus, the specifications of the electronicendoscope 100 are also superimposed on the image captured by the CCD 102(S154) Note that other information obtained from the EEPROM 102 such asserial number and data on white balance may also be superimposed on theimage displayed by the monitor 300 instead of or together with the scopetype and specifications of the electronic endoscope 100.

Next, the CPU 201 decides whether the currently connected endoscope is apurchased one or a leased one. This is done by checking the value of“ownership” obtained from the EEPROM 102 (S156).

If “ownership” indicates the endoscope is leased, i.e., “ownership”=1 or2, then the CPU 201 sends a command to the CRT controller 206 tosuperimpose characters “lease” on the image displayed on the monitor300. Thus, the operator can notice that the currently used endoscope isa leased one (S158). Note that the date of expiration of the term oflease may also be displayed on the monitor 300.

If “ownership”, however, indicates that the endoscope is purchased,i.e., “ownership” 0, then S158 is skipped, and the operation of theprocessor 200 returns to the main flow shown in FIG. 5.

FIG. 7 is a flow chart showing the subroutine ENDOSCOPE REGISTRATIONcalled in S110 of the main routine of FIG. 5.

In this routine, the CPU 201 decides whether or not the data related tothe currently connected endoscope is already registered with thedatabase in the memory 208 (S202). This is achieved by searching withinthe memory 208 for a record including data that matches the “scope name”and “serial no.” obtained from the EEPROM 102.

If there is a record including the above mentioned data (S202:Yes), itmeans the data of the electronic endoscope 100 currently connected isalready registered in this case, the “register no.” of the record foundis set to current_scope (S204) and the operation of the processor 200proceeds to S220 which will be described later.

If a record including the above mentioned data is not found (S202:No),it means the electronic endoscope 100 is not yet registered. In thiscase, the CPU 201 checks whether there is still any available memoryspace, or open records, within the memory 208 to store the data obtainfrom the EEPROM 102 (S206).

In the case there is still an open record (S206:Yes), the “register no.”of the open record is set to “current scope” (S212). If there are morethan one open records, the smallest “register no.” is preferablyselected and set to the “current scope” After execution of S212, theoperation of the processor 200 proceeds to S216 which will be describedlater.

In the case no open record is found (S206:No), then the CPU 201 checksthe term of lease, or “expiration”, of each record in the memory 208(S208). If CPU 201 finds any records of which term of lease has alreadyexpired (S208:Yes), then the CPU 201 deletes the data of that recordexcept the register number (S210), since such data are not valid andtherefore should not remain in the database. Then, the record deleted atS210 became an open record. Further, the CPU 201 sets the registernumber of the record to “current_scope” (S212).

If there is no record having an expired term of lease (S208:No), then asubroutine SELECT DATA is executed to select one of the records to befreed up for storing the data of the new endoscope (S214). During thissubroutine, the register number of the record freed up is set to“current_scope” as will be described later.

After the execution of S212 or S214, the CPU201 stores the data obtainedfrom EEPROM 102, into the record identified by “current_scope” (S216).Specifically, the CPU 201 stores “serial no.”, “scope name”, “wb(r)”,“wb(b)”, “ownership”, “spec”, and “expiration” obtained from the EEPROM102 into the record. In this manner, the data of the new endoscope isautomatically registered with the database.

It should be noted that instead of data obtained from the EEPROM 102,data manually inputted from the keyboard 400 may be stored into therecord specified by “current_scope” so that, for example, data ofendoscopes that do not have memories can also be registered to theprocessor 200.

Next, the CPU 201 obtains the current date and time information from theRTC 209 and stores it in “registered date & time” of the recordspecified by “current_scope” (S218). This is to make a record of thedate and time of registration of the new electronic endoscope 100.

After the execution of S218 or S204, “used date & time” and “count” ofthe record specified by “current scope” are updated. That is, thecurrent time information obtained from the RTC 209 is overwritten to“used date & time” (S220), and “count” is incremented by one (S222).After S222, the operation of the processor 200 returns to the main flowshown in FIG. 5.

FIG. 8 is a flow chart showing the subroutine SELECT DATA called in S214of the subroutine ENDOSCOPE REGISTRATION of FIG. 7. In this subroutine,one record is selected to free up and thereby prepare an open record forstoring new data obtained from the currently connected electronicendoscope 100. Records including data of leased endoscopes is selectedin preference to other records, and records of endoscopes leased forshort terms are selected in further preference to records of endoscopesleased for long terms. Thus, data of endoscopes that the user owns orcan keep for a longer time tend to remain in the database.

Specifically, the CPU first checks whether there are any recordsincluding data of an endoscope leased for a short term, i.e.“ownership”=2 (S252). If there are any (S252:Yes), then the CPU 201select the record having the oldest “registered date & time” among thoserecords (S254), since the term of lease of such endoscope expires first.

If there isn't any record of which “ownership” is 2 (S252:No), then theCPU 201 searches for records related to endoscopes leased for longterms, i.e., “ownership”=1 (S256). If there are any (S256:Yes). then theCPU 201 selects the record having the oldest “registered date & time”among those records this time also (S258).

If there isn't any record of which “ownership” is 1 (S256:No), i.e., ifthere isn't any endoscopes leased, then the CPU 201 selects the recordhaving the oldest “registered date & time” among the records includingdata of purchased endoscope (S260).

After the execution of S254, S258, or S260, the data of the selectedrecord is deleted except “register no.” (S262). Further, the “registerno.” of the selected record is set to “current_scope” (S264). AfterS264, the operation of the processor 200 returns to the subroutineENDOSCOPE REGISTRATION shown in FIG. 7.

FIG. 9 is a flow chart showing the subroutine DISPLAY DATE & TIME calledin S116 of the main routine shown in FIG. 5.

In this subroutine, the CPU 201 checks whether or not the date and timeinformation of a variable “date & time” indicates the exact time bycomparing “date & time” with the date and time information from the RTC209 (S302).

If the difference between the two pieces of the date and timeinformation is less than a second, then the CPU 201 decides the twopieces of the date and time information are same (S302:Yes). In thiscase, the operation of the processor 200 immediately returns to the mainflow of FIG. 5 without updating the “date & time”.

If the difference between the two pieces of date and time information isnot less that one second (S302:No), then the date and time informationfrom the RTC 209, or the current date and time, is set to “date & time”(S304). Then, the CPU 201 generates text information indicating the dateand time stored in “date & time” such as “May 21, 2002, 15:20:31”, forexample, and sends it to the CRT controller 206 to superimpose thecurrent date and time on the image displayed by the monitor 300 (S306).In this manner, time information displayed is updated every second.

After the execution of S306, the operation of the processor 200 returnsto the main flow shown in FIG. 5.

FIG. 10 is a flow chart showing the subroutine ADJUSTMENT called in S118of the main routine shown in FIG. 5. This routine is for allowing theoperator to manually adjust the white balance of the image captured bythe CCD 104, and the opening size of the diaphragm 210.

In this routine, the CPU 201 decides whether or not the adjustment ofwhite balance is requested by checking the signals from the keyboard400, the operation panel 207, and the operation buttons 107 (S352). Ifthere is a request (S352:Yes), then the CPU 201 rewrites the value ofthe “wb(r)”, “wb(b)” in the record specified by current scope inaccordance with the signal from the keyboard 400, the operation panel207, or the operation buttons 107 (S354). Further, the CPU 201 sends thevalue of latest “wb(r)” and “wb(b)” to the second signal processor 205so that the second signal processor 205 re-adjusts the white balance ofthe image generated there (S356).

After the execution of S356 or in the case there isn't any request forwhite balance adjustment (S352:No), the CPU 201 checks again the outputsignals from the keyboard 400, the operation panel 207, and theoperation buttons 107 to decide whether or not the adjustment ofdiaphragm size is requested (S358).

If there is a request (S358:Yes), then the CPU 201 opens/closes thediaphragm 210, via the diaphragm controller 211, in accordance with therequest from the keyboard 400, the operation panel 207, or the operationbuttons 107 to control the amount of light introduced into the lightguide 103 (S360).

If the execution of 5360 is completed or in the case there isn't anyrequest (S358:No), the operation of the processor returns to the mainflow of FIG. 5.

It should be noted that the operation of processor 200 described in FIG.5 through FIG. 10 may be modified in many ways within the scope of theinvention.

For example, S254, S258, and S260 in the subroutine SELECT DATA shown inFIG. 8 may be replaced with steps that selects the record including theoldest “used date & time” instead of the oldest “registered date & time”as shown in FIG. 11 (see S254*, S258*, and S260*). If S254, S258, andS260 are replaced with S254*, S258*, and S260*, respectively, the datarelated to the endoscope seldom used, and may have not high possibilityto be used again in the future, is deleted to free up the memory spacefor registering data of the new endoscope.

FIG. 12 shows a flow chart of the operation of the processor 200 whenthe electronic endoscope is connected according to another embodiment ofthe invention.

In this embodiment, the processor 200 first obtains the data stored inthe EEPROM 102 of the electronic endoscope 100 (S302). A part of or allof the data obtained are displayed on the monitor 300 if a predeterminedcommand is inputted to the keyboard 400, operation panel 207, or theoperation buttons 107 so that the operator can confirm the data of theelectronic endoscope 100 (S304, S306).

Next, the processor 200 decides whether the currently connectedelectronic endoscope 100 is already registered with the database in thememory 208 by searching for a record including the “serial no.” and“scope name” that matches those obtained from the electronic endoscope100 (S308).

If there is a record including the same data (S308:Yes), which indicatesthe currently connected electronic endoscope 100 is already registered,then the operation of the processor 200 proceeds to S324 and S326 whichwill be described later.

If, however, there isn't any record including same data (S308:No), thatis, the currently connected electronic endoscope 100 is a new one, theprocessor 200 displays a message asking the operator whether or not thenew electronic endoscope 100 should be registered with the database, andaccepts an instruction from the operator via the keyboard 400, theoperation panel 207, or the operation buttons 107 (S310).

If the operator inputs an instruction not to register the new electronicendoscope 100 e, the processor exits the present routine. If aninstruction to register the new electronic endoscope 100 is inputted,then the processor 200 checks whether the database established in thememory 208 is full or not (S312). This is achieved by counting thenumber of endoscopes already registered with the database. If the numberis less than 39, which means the database is not yet full (S312:No),then the processor 200 stores the endoscope data obtained in S302 intoan open record in the memory 208 (S314). Note that, in S314, theprocessor 200 may display the content of the database and let theoperator select the open record into which the data should be stored.

In the case the database in the memory 208 is full (S312:Yes), that is,39 endoscopes are already registered with the database, the processor200 displays a message on the monitor asking whether the data of one ofthe registered endoscopes should be replaced with that of the newendoscope, and accepts an instruction from the operator via the keyboard400, operation panel 207, or the operation button 107 (S316).

If an instruction not to replace data is accepted, the processor 200exits the present routine without registering the new endoscope with thedatabase (S316:No).

If an instruction to replace data is accepted (S316:YES), then theprocessor 200 displays the content of the database in the memory 208 onthe monitor 300 and lets the operator select the record, or theregistered endoscope, of which data should be replaced (S318) Thus, theoperator can select the endoscope to be canceled by comparing the data,such as “ownership”, “spec”, and “expiration”, of each registeredendoscope and inputting the register number of one from the keyboard400, for example.

Next, the processor 200 deletes the data in the record corresponding tothe register number inputted, except the register number itself, andstores the data obtained from the EEPROM 102 of the electronic endoscope100 (S320).

After performing S314 or S320, the processor 200 stores the current dateand time outputted from the RTC 209 into the “registered date & time” ofthe record into which the processor 200 has just stored the data in S314or S320 (S322).

The processor 200 also set the current date and time obtained from theRTC 209 into the “used data & time” of the record which includes thedata of the currently connected endoscope 100 (S324). Further, theprocessor 200 increments “count” of the same record (S326) and exits thepresent routine.

FIG. 13 schematically shows a modified configuration of the electronicendoscope system 1 of FIG. 1. Note that the electronic endoscope systemof FIG. 13 is essentially same as the system of FIG. 1 except the pointsdescribed hereinafter.

The modified electronic endoscope system 1 a of FIG. 13 has a switchdevice 106 which is provided to the connector 130 of the endoscope 100.The switch device 106 is configured to memorize, by its state, a part ofthe information that is stored in the EEPROM 102 in the electronicendoscope system 1 of FIG. 1. In the present case, the switch device 106memorizes information related to the ownership, the specifications andthe expiration of the endoscope 100. Other information on the endoscope100 that are recited in FIG. 2 are stored in the EEPROM 102 as in thesystem of FIG. 1. The processor 200 obtains the information of theendoscope 100 partly from the EEPROM 102 and partly from the switchdevice 106, by checking the state of the switch device 106, and storesthose data into the memory 208 if the endoscope 100 is a new one.

The switch device 106 includes four switch elements 106 a, 106 b and 106c such as dip switches each having ON and OFF states. However, two ormore rotary switches having many states may also be used for switchelements 106 a, 106 b and 106 c instead of dip switches.

The state of first and second switch elements 106 a and 106 b representsinformation related to the ownership of the endoscope 100. For example,if the states of first and second switch elements 106 a and 106 b areboth OFF, it indicates the endoscope is a purchased one if the firstswitch element 106 a is OFF while the second switch element 106 b is ON,the endoscope 100 is leased for a long term. Further, if the firstswitch element 106 a is ON while the second switch element 106 b is OFF,the endoscope 100 is leased for a short term.

The state of the third switch element 106 c indicates the specificationsof the endoscope. That is, the third switch element 106 c is set ON forthe endoscope 100 of standard specifications, and OFF for the endoscope100 having special specifications.

The switch device 106 further includes a fourth switch element 106 d forsetting the expiration date of the lease of the endoscope. The fourthswitch element 106 d may be a rotary switch by which the date month andyear of expiration can be set up.

The switch device 106 further includes a switch state detector 105 whichis connected to each of the switch elements 106 a, 106 b, 106 c and 106d via a cable 105 a. The switch state detector 105 generates signalscorresponding to the states of the switch elements and outputs it to theCPU 201 via the signal cable 108.

A watertight cover member 110 is also provided detachably to theconnector 130 to prevent the switch elements 106 a-106 d from beingoperated unintentionally.

It should be noted that the switch state detector 105 may be replacedwith a plurality of I/O ports, each connected to different one of theswitch elements 106 a-106 d. In this case, the CPU 201 itself detectsthe state of each switch elements 106 a-106 d via the I/O ports toobtain information related to the ownership, the specifications and theexpiration of the endoscope 100.

It should be also noted that the switch device 106 may be provided tothe operation portion 120 of the endoscope 100 instead of to theconnector 130.

The present disclosure relates to the subject matters contained inJapanese Patent Application No. P2001-206644, filed on Jul. 6, 2001, andJapanese Patent Application No. P2001-263445, filed on Aug. 31, 2001,which are expressly incorporated herein by reference in theirentireties.

1. A method for managing an endoscope, comprising: storing, in a storagedevice of the endoscope, ownership information that indicates a term forwhich said endoscope is allowed to be utilized; retrieving the ownershipinformation from the storage device; determining, based on the ownershipinformation, an ownership status that indicates whether said endoscopeis utilizable; presenting the ownership status to an operator on adisplay, wherein said ownership information includes information onwhether said endoscope is purchased.
 2. A method for managing anendoscope, comprising: storing, in a storage device of the endoscope,ownership information that indicates a term for which said endoscope isallowed to be utilized; retrieving the ownership information from thestorage device; determining, based on the ownership information, anownership status that indicates whether said endoscope is utilizable;presenting the ownership status to an operator on a display, whereinsaid ownership information includes information on whether saidendoscope is leased.
 3. The method according to claim 1, wherein saidstorage device comprises a nonvolatile memory.
 4. The method accordingto claim 1, wherein said storage device comprises a switch, said switchmaintaining a state set by an operator.
 5. The method according to claim4, wherein said endoscope comprises: a flexible inserting tube to beinserted to a human body; and an operation portion connected to aproximal end of said flexible inserting tube, said operation portionbeing operated by an operator to control said flexible inserting tube,and a connector configured to be connected to the processor and totransmit signals generated in said endoscope to said processor, saidprocessor configured to process said signals obtained from saidendoscope through said connector, wherein said switch is provided to oneof said operating portion and said connector.
 6. The method according toclaim 5, wherein said endoscope includes a cover for said switch, saidcover preventing said switch from unintentional operation.
 7. The methodaccording to claim 2, wherein said ownership information includesinformation on whether a term of lease of said endoscope is less than apredetermined period.
 8. The method according to claim 2, wherein saidstorage device comprises a nonvolatile memory.
 9. The method accordingto claim 2, wherein said storage device comprises a switch, said switchmaintaining a state set by an operator.
 10. The method according toclaim 9, wherein said endoscope comprises: a flexible inserting tube tobe inserted to a human body; and an operation portion connected to aproximal end of said flexible inserting tube, said operation portionbeing operated by an operator to control said flexible inserting tube,and a connector configured to be connected to the processor and totransmit signals generated in said endoscope to said processor, saidprocessor configured to process said signals obtained from saidendoscope through said connector, wherein said switch is provided to oneof said operating portion and said connector.
 11. The method accordingto claim 10, wherein said endoscope includes a cover for said switch,said cover preventing said switch from unintentional operation.
 12. Amethod for managing an endoscope, comprising: storing, in a storagedevice of the endoscope, specification information indicating designspecifications of said endoscope and ownership information including atleast information on whether said endoscope is purchased or leased;determining, based on the ownership information, an ownership statusthat indicates whether said endoscope is utilizable; retrieving thespecification information from the storage device and retrieving theownership information from the storage device; presenting thespecification information of said endoscope to an operator whenreference is made to the specification information and presenting theownership information of said endoscope to the operator when referenceis made to the ownership information.
 13. The method according to claim12, wherein said storage device comprises a nonvolatile memory.
 14. Themethod according to claim 12, wherein said storage device comprises aswitch that maintains a state set by an operator.
 15. The methodaccording to claim 14, wherein said endoscope further comprises: aflexible inserting tube to be inserted to a human body; and an operationportion connected to a proximal end of said flexible inserting tube,said operation portion being operated by an operator to control saidflexible inserting tube, and a connector configured to be connected to aprocessor and to transmit signals generated in said endoscope to saidprocessor, said processor configured to process said signals obtainedfrom said endoscope through said connector, wherein said switch isprovided to one of said operation portion and said connector.
 16. Themethod according to claim 15, wherein said endoscope further comprises:a cover for said switch, said cover preventing said switch fromunintentional operation.